package mapkit.carto
{
	import mx.events.PropertyChangeEvent;

	public final class Location extends MapGeometry
	{
		public var x:Number=0;

		public var y:Number=0;

		override public function get where():Location
		{
			return new Location(x, y, srid);
		}

		override public function set where(value:Location):void
		{
			x=value.x;
			y=value.y;
		}

		override public function get extent():Envelope
		{
			return new Envelope(x, y, x, y, srid);
		}

		public function Location(x_:Number=0, y_:Number=0, srid_:String="EPSG:4326")
		{
			x=x_;
			y=y_;
			srid=srid_;
			where=this;
		}

		override public function toString():String
		{
			return "POINT(" + x + "  " + y + ")";
		}

	}
}
